package com.gopay.common.domain.cps.bankcard;

import com.gopay.common.cipher.utils.SensitiveInfoUtils;
import com.gopay.common.domain.BaseEntity;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

/**
 * CLASSNAME:BankCardAuthDtl
 * Description:风控银行卡鉴权信息流水表
 * DATE:2018/3/26/026
 * AUTHER:PANSHICHAO
 * www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "BANKCARD_AUTH_DTL")
public class BankCardAuthDtl extends BaseEntity {
    private static final long serialVersionUID = 1L;
    //DTL_ID（表主键）
    private String dtlId;
    //控制台操作员ID
    private String operId;
    //控制台操作员名称
    private String operName;
    //要鉴权的姓名（PCI加密处理）
    private String buyerRealName;
    //要鉴权的银行卡号（PCI加密处理）
    private String buyerRealBankAcctNum;
    //鉴权结果
    private String authedResult;
    //结果备注
    private String authedRemark;
    //记录创建时间
    private Date createdTs;
    //记录修改时间
    private Date lastUpdTs;
    //记录的过期时间
    private Date expiryTs;
    @Id
    @GenericGenerator(name="systemUUID",strategy="uuid")
    @GeneratedValue(generator="systemUUID")
    @Column(name = "DTL_ID", insertable = true, updatable = true, nullable = false)
    public String getDtlId() {
        return dtlId;
    }

    public void setDtlId(String dtlId) {
        this.dtlId = dtlId;
    }
    @Basic
    @Column(name = "OPER_ID")
    public String getOperId() {
        return operId;
    }

    public void setOperId(String operId) {
        this.operId = operId;
    }
    @Basic
    @Column(name = "OPER_NAME")
    public String getOperName() {
        return operName;
    }

    public void setOperName(String operName) {
        this.operName = operName;
    }

    @Basic
    @Column(name = "AUTHED_RESULT")
    public String getAuthedResult() {
        return authedResult;
    }

    public void setAuthedResult(String authedResult) {
        this.authedResult = authedResult;
    }
    @Basic
    @Column(name = "AUTHED_REMARK")
    public String getAuthedRemark() {
        return authedRemark;
    }

    public void setAuthedRemark(String authedRemark) {
        this.authedRemark = authedRemark;
    }
    @Basic
    @Column(name = "CREATED_TS")
    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }
    @Basic
    @Column(name = "EXPIRY_TS")
    public Date getExpiryTs() {
        return expiryTs;
    }

    public void setExpiryTs(Date expiryTs) {
        this.expiryTs = expiryTs;
    }
    @Basic
    @Column(name = "AUTHED_CARDNO")
    public String getBuyerRealBankAcctNum() {
        return SensitiveInfoUtils.smartDecryptWithCheck(buyerRealBankAcctNum);
    }

    public void setBuyerRealBankAcctNum(String buyerRealBankAcctNum) {
        this.buyerRealBankAcctNum = SensitiveInfoUtils.smartEncryptWithCheck(buyerRealBankAcctNum);
    }
    @Basic
    @Column(name = "AUTHED_NAME")
    public String getBuyerRealName() {
        return SensitiveInfoUtils.smartDecryptWithCheck(buyerRealName);
    }

    public void setBuyerRealName(String buyerRealName) {
        this.buyerRealName = SensitiveInfoUtils.smartEncryptWithCheck(buyerRealName);
    }
    @Basic
    @Column(name = "LAST_UPD_TS")
    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

}
